<template>
  <div>
    <h1>分类</h1>
    <button @click="goHome">goHome</button>
    <button @click="delRoute">delroute</button>
    <ul>
      <router-link :to="{ name: 'dianshang' }">电商</router-link>

      <router-link :to="{ name: 'shouxuan' }">首选</router-link>
    </ul>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  methods: {
    goHome() {
      this.$router.go(-1);
    },
    delRoute() {
      // this.$router.removeRoute
    },
  },
};
</script>

<style lang="scss">
</style>